package com.mapper;

import com.pojo.Hydropower;
import com.vo.HydropowerVo;
import com.vo.LineVo;
import com.vo.shuidianVo;

import java.util.List;

public interface HydropowerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Hydropower record);

    int insertSelective(Hydropower record);

    Hydropower selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Hydropower record);

    int updateByPrimaryKey(Hydropower record);
    /***

     * 根据用户id查询最近一次的缴水费id
     * @param ownerid
     * @return
     */
    public String selectMax(Integer ownerid);

    /***
     * 根据id查询
     * @param id
     * @return
     */
    public Hydropower selectHydropById(Integer id);

    /***
     * 添加水表
     * @return
     */
    public int addHyDropWater(Hydropower hydropower);

    /***
     * 根据用户id查询最近一次缴电费
     * @param ownerid
     * @return
     */
    public String selectMaxe(Integer ownerid);

    /***
     * 添加电费缴费
     * @param hydropowerVo
     * @return
     */
    public int addhyDropE(HydropowerVo hydropowerVo);





    /***
     * 查询所有的水费缴费记录
     * @return
     */
    public List<Hydropower> selectAllWaterRecording(Hydropower hydropower);

    /***
     * 查询所有的电费缴费记录
     * @return
     */
    public List<Hydropower> selectAllEleRecording(HydropowerVo hydropowerVo);


    /**
     * 查询所有的金额
     */

    public List<LineVo> selectallHydropower();


    /**
     * 按照小区查询金额
     */

    public List<shuidianVo> selectallByplotidHydropower();
}